package com.lyx.Demo;

public class Demo05 {

    private Demo04 demo04;

    public Demo04 getDemo04() {
        return demo04;
    }

    public void setDemo04(Demo04 demo04) {
        this.demo04 = demo04;
    }

    @Override
    public String toString() {
        return "Demo05{" +
                "demo04=" + demo04 +
                '}';
    }

    public static void main(String[] args) {
        Demo05 demo05 = new Demo05();

        Demo04 d = new Demo04();
        d.setAge(1);

        demo05.setDemo04(d);

        System.out.println(demo05);
        System.out.println("=================");
        d = new Demo04();
        System.out.println(demo05);

    }
}
